﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms.DataVisualization.Charting;

namespace UCL.Powersource.Views.Analysis
{
    [Export(typeof(ManyTeamsAtDifferentTimesLineChartView))]
    public class ManyTeamsAtDifferentTimesLineChartView : ChartViewBase
    {
        private string _LegendTitle = "Time Frames";
        protected override string LegendTitle { get { return _LegendTitle; } }

        protected override SeriesChartType SeriesType
        {
            get { return SeriesChartType.Line; }
        }

        protected override void FillChart()
        {
            MyChart.Titles.Add(Table.TableName);

            foreach (var timeframe in VM.ActiveIReportingContext.SelectedITimeFrames)
            {
                if (!Table.Columns.Contains(timeframe.Label)) continue;

                MyChart.Series.Add(GenerateSeries(timeframe.Label, "Teams", timeframe.Label));
            }
        }
    }
}

